package com.cqjtu.tto.dao.pojo;



import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.cqjtu.tto.vo.params.ProAddParam;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigInteger;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.regex.Pattern;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Project {

    @TableId("project_id")
    private Long projectId;

    private Long userId;

    private String projectName;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime projectStartTime;

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date projectEndTime;

    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime projectCompleteTime;

    private String projectStatus;

    private String projectVersion;

    private float projectIncome;

    private String customerEvaluation;

    @TableField(fill = FieldFill.INSERT)
    private Integer projectDeleted;


    public Project(ProAddParam proAddParam) {
        this.setProjectName(proAddParam.getProjectName());
        this.setProjectEndTime(proAddParam.getProjectEndTime());
        this.setUserId(proAddParam.getUserId());
        this.setProjectVersion(proAddParam.getProjectVersion());
    }
}
